import request from '@/utils/request'

// 活动列表
export function activityList(data: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/list',
    method: 'get',
    params: data
  })
}
// 活动开始/结束
export function changeStatus(data: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/change-status',
    method: 'post',
    data
  })
}
// 删除/批量删除
export function delActivity(data: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/del',
    method: 'post',
    data
  })
}
// 下载/批量下载
export function download(data: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/download',
    method: 'post',
    data
  })
}
// 新建活动
export function newActivities(data: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/create',
    method: 'post',
    data
  })
}
// 查看活动
export function lookActivities(data: any) {
  return request({
    url: `/scrm-api/console/market/luckdraw/lottery/info?activity_id=${data}`,
    method: 'get'
  })
}
// 编辑活动
export function editActivities(data: any) {
  return request({
    url: 'scrm-api/console/market/luckdraw/lottery/edit',
    method: 'post',
    data
  })
}
// -------------------------------------------------------统计-------------------------------------------------------
export function getStatistics(params: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/statistics',
    params
  })
}
// 导出
export function exportData(params: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/statistics-export',
    params
  })
}
// 下载
export function winningList(params: any) {
  return request({
    url: '/scrm-api/console/market/luckdraw/lottery/win-record',
    params
  })
}
